export default{
    //改变状态
    updateIsbtnShow:function(state, value){
        state.isbtnShow = value;
      },
      updatePlayList:function(state, value){
        state.plaList = value;
        console.log(state.plaList)
      },
      updatePlayListIndex:function(state, value){
        state.plaListIndex = value
      },
      //暂停或启动播放
      updateDetailShow:function(state){
        state.detailShow =! state.detailShow 
      },
      //保存歌曲
      updateLyricList:function(state,value){
        state.lyricList = value
      },
      //改变歌词当前时间
      updatecurrentTime:function(state, value){
       // console.log(state.currentTime)
        state.currentTime = value;
      },
      //歌曲总时长
      updateDuration(state, value){
        state.duration = value
      },
      //搜索出来的歌添加到列表
      pushPlsyList(state, value){
       state.plaList.push(value)
      },
      //登录
      updateIsLogin(state, value){
        state.isLogin = true;
      },

      //登录 状态
      updateToken(state, value){
        state.token = value;
        //把登录状态保存到 localStorage.setItem 里面
        localStorage.setItem('token',state.token)
      },

      //用户信息
      updateUser(state, value){
        state.user = value
      }
      
}